package com.aia.ilp.web;

import java.util.List;

import org.apache.log4j.Logger;

import com.aia.ilp.service.MainService;
import com.aia.ilp.webinterface.LatestCusts;
import com.aia.ilp.webinterface.Pageable;
import com.aia.ilp.webinterface.TopCusts;
import com.cfh.web.PageBean;
import com.opensymphony.xwork2.ActionSupport;

public class PublicAction extends ActionSupport implements TopCusts, Pageable, LatestCusts {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(PublicAction.class);

	private static final long serialVersionUID = 1L;
	private List topCusts;
	private List latestCusts;
	private MainService mainService;

	private PageBean pageBean = new PageBean();
	private String search;

	private int page = 1;
	private int pageSize = 6;
	/***
	 * nouse
	 */
	public String execute() {
		if (logger.isDebugEnabled()) {
			logger.debug("execute() - start"); //$NON-NLS-1$
		}
		mainService.prepareTopCusts(this);
		//mainService.prepareLatestCusts(this);

		if (logger.isDebugEnabled()) {
			logger.debug("execute() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}

	public List getTopCusts() {
		return topCusts;
	}

	public void setTopCusts(List list) {
		topCusts = list;
	}

	public void setMainService(MainService mainService) {
		this.mainService = mainService;
	}

	public MainService getMainService() {
		return mainService;
	}

	public void setLatestCusts(List latestCusts) {
		this.latestCusts = latestCusts;
	}

	public List getLatestCusts() {
		return latestCusts;
	}

	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}

	public PageBean getPageBean() {
		return pageBean;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPage() {
		return page;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setSearch(String search) {
		this.search = search;
	}

	public String getSearch() {
		return search;
	}

}
